Pass registered resource names to config.Validate#423
Merged
ack-prow[bot] merged 1 commit intoaws-controllers-k8s:mainfrom May 1, 2023
Merged
Conversation
5046b61 to
28d5f3c
Compare
| if err := ackCfg.Validate(); err != nil { | ||
| managerFactories := svcresource.GetManagerFactories() | ||
| resourceKinds := make([]string, 0, len(managerFactories)) | ||
| for _, mf := range managerFactories { |
Contributor
There was a problem hiding this comment.
Maybe we should just pass the entire GroupKind, so that different downstream validation can use whichever naming and casing it needs
Member
Author
There was a problem hiding this comment.
Agreed. Changed to GroupKinds
config.Validateconfig.Validate
28d5f3c to
6ef3d4f
Compare
0753eca to
af878bc
Compare
Member
Author
|
/unhold |
Member
Author
|
/retest |
Member
Author
|
/test s3-controller-test |
Member
Author
|
/retest |
2 similar comments
Member
Author
|
/retest |
Member
Author
|
/retest |
Member
Author
|
/test all |
RedbackThomson
approved these changes
Apr 18, 2023
templates/cmd/controller/main.go.tpl
Outdated
|
|
||
| if err := ackCfg.Validate(); err != nil { | ||
| managerFactories := svcresource.GetManagerFactories() | ||
| resourceGroupKinds := make([]schema.GroupVersionKind, 0, len(managerFactories)) |
Contributor
There was a problem hiding this comment.
nit: These are now GVKs
Completes aws-controllers-k8s/runtime#117 This patch adds a tiny modification to the controllers `main.go` that passes the resource names to `ackCfg.Validate` method. Needs a new runtime release. /hold Signed-off-by: Amine Hilaly <hilalyamine@gmail.com>
af878bc to
3a51a86
Compare
Member
Author
|
/retest |
Collaborator
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: A-Hilaly, jaypipes, RedbackThomson The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[fixes https://github.com/aws-controllers-k8s/community/issues/1647]
Completes aws-controllers-k8s/runtime#117
This patch adds a tiny modification to the controllers
main.gothatpasses the resource names to
ackCfg.Validatemethod.Needs a new runtime release.
/hold
Signed-off-by: Amine Hilaly hilalyamine@gmail.com
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.